#include <stdio.h>

int main() {
    int num[10];
    int min_index, temp;
    printf("请输入10个整数: ");
    for (int i = 0; i < 10; i++) {
        scanf("%d", &num[i]);
    }

    for (int i = 0; i < 9; i++) {
        min_index = i;
        for (int j = i+1; j < 10; j++) {
            if (num[j] < num[min_index]) {
                min_index = j;
            }
        }
        if (min_index != i) {
            temp = num[i];
            num[i] = num[min_index];
            num[min_index] = temp;
        }
    }
    printf("排序后的数组: ");
    for (int i = 0; i < 10; i++) {
        printf("%d ", num[i]);
    }
    printf("\n");
    
    return 0;
}
